import request from '@/utils/request'

// 查询法制审批列表
export function listLegalReviewOpinion(query) {
  return request({
    url: '/ruoyi-system/legalreviewopinion/list',
    method: 'get',
    params: query,
  })
}

// 查询法制审批详细
export function getLegalReviewOpinion(id) {
  return request({
    url: '/ruoyi-system/legalreviewopinion/' + id,
    method: 'get',
  })
}

// 新增法制审批
export function addLegalReviewOpinion(data) {
  return request({
    url: '/ruoyi-system/legalreviewopinion',
    method: 'post',
    data: data,
  })
}

// 修改法制审批
export function updateLegalReviewOpinion(data) {
  return request({
    url: '/ruoyi-system/legalreviewopinion',
    method: 'put',
    data: data,
  })
}

// 删除法制审批
export function delLegalReviewOpinion(id) {
  return request({
    url: '/ruoyi-system/legalreviewopinion/' + id,
    method: 'delete',
  })
}

// 预览

export function previewLegalReviewOpinion(params) {
  return request({
    url: '/ruoyi-system/legalreviewopinion/preview',
    method: 'get',
    params,
  })
}

// 详情页预览
export function previewPdf(data) {
  return request({
    url: '/ruoyi-system/legalreviewopinion/pdfPreview',
    method: 'post',
    data,
  })
}

// 保存附件
export function addLegalReviewOpinionFiles(data) {
  return request({
    url: '/ruoyi-system/legalreviewopinion/addFiles',
    method: 'post',
    data,
  })
}

// 导出
export function exportLegalReviewOpinion(data) {
  return request({
    url: '/ruoyi-system/legalreviewopinion/export',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 立案号下拉
export function getCaseList() {
  return request({
    url: '/ruoyi-system/legalreviewopinion/caseList',
    method: 'get',
  })
}

// 获取处罚决定书填的内容呢
export function getContent(id) {
  return request({
    url: '/ruoyi-system/legalreviewopinion/getContent?caseId=' + id,
    method: 'get',
  })
}

// 提交流程接口
export function submitLegalReviewOpinion(data) {
  return request({
    url: '/ruoyi-system/legalreviewopinion/submit',
    method: 'post',
    data,
  })
}

// 审核接口
export function reviewLegalReviewOpinion(data) {
  return request({
    url: '/ruoyi-system/legalreviewopinion/review',
    method: 'post',
    data,
  })
}

// 转办接口
export function transferLegalReviewOpinion(data) {
  return request({
    url: '/ruoyi-system/legalreviewopinion/transferTask',
    method: 'post',
    data,
  })
}
